import request from '@/utils/request'//引入ajax
const api_name = '/admin/system'
// 查询状态
export const findMovement = (queryDto) => {
    return request({
        url: `${api_name}/findMovement`,
        method: 'get',
        params:queryDto
    })
}

//删除
export const DeleteMovement = (id) => {
    return request({
        url: `${api_name}/DelMovementById/${id}`,
        method: 'delete'
    })
}


//查询所有运动类型
export const findSports = () => {
    return request({
        url: `${api_name}/findSports`,
        method: 'get'
    })
}
//添加信息
export const addmovement = (movement) => {
    return request({
        url: `${api_name}/addmovement`,
        method: 'post',
        data:movement
    })
}

//根据id查询信息 
export const findMovementById = (id) => {
    return request({
        url: `${api_name}/findMovementById/${id}`,
        method: 'get'
    })
}

//修改信息
export const updateMovement = (movement) => {
    return request({
        url: `${api_name}/updateMovement`,
        method: 'put',
        data:movement
    })
}